package com.boe.service.impl;

import com.boe.dao.CategoryDao;
import com.boe.dao.impl.CategoryImpl;
import com.boe.domain.Category;
import com.boe.service.CategoryService;

import java.util.List;

public class CategoryServiceImpl implements CategoryService {


    @Override
    public List<Category> findAll() {
        CategoryDao categoryDao = new CategoryImpl();
        return categoryDao.findAll();
    }

    //分类信息保存
    @Override
    public void save(Category category) {
        CategoryDao categoryDao = new CategoryImpl();
        categoryDao.save(category);
    }

    @Override
    public Category findOne(Integer cid) {
        CategoryDao categoryDao = new CategoryImpl();
        return categoryDao.findOne(cid);
    }

    @Override
    public void update(Category category) {
        CategoryDao categoryDao = new CategoryImpl();
        categoryDao.update(category);
    }

    @Override
    public void delete(Integer cid) {
        CategoryDao categoryDao = new CategoryImpl();
        categoryDao.delete(cid);

    }


}
